package com.bltec.emergency.service.orgService.impl;

import com.bltec.emergency.mapper.OrgMapper;
import com.bltec.emergency.model.Org;
import com.bltec.emergency.service.orgService.OrgService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class OrgServiceImpl implements OrgService {
    @Resource
    private OrgMapper orgMapper;
    @Override
    public boolean add(Org org) {
        return orgMapper.insert(org);
    }

    @Override
    public boolean deleteOrgById(Long id) {
        return orgMapper.setDisableById(id);
    }

    @Override
    public boolean updateOrgById(Org org) {
        return orgMapper.updateOrgById(org);
    }

    @Override
    public Org getOrgById(Long id) {
        return orgMapper.getOrgById(id);
    }

    @Override
    public List<Org> getAll() {
        return orgMapper.selectAll();
    }
}
